package cn.community.system.mapper;

import cn.community.system.domain.Association;
import cn.community.system.domain.Member;
import cn.community.system.query.QueryObject;
import cn.community.system.vo.AssociationVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AssociationMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Association association);

    Association selectByPrimaryKey(Long id);

    List<Association> selectAll();
    List<AssociationVo> selectAll2();

    int updateByPrimaryKey(Association association);

    List<Association> selectForList(QueryObject qo);

    List<AssociationVo> selectForMyAssoList(QueryObject qo);

    Long findIdByAssociation(String association);

    // 通过手机号找用户信息
    Association findByPhone(String phone);

    Association selectByName(String username);

    Association selectByNameAndPassword(String username,String password);

    void insertRelation(@Param("aid") Long aid, @Param("rid") Long rid);

    void deleteRelation(Long id);

    void deleteBatch(Long[] ids);

    void passOne(@Param("id")Long id, @Param("isAgree")Integer isAgree);

    List<Association> getFounderByDutyId(Long id);

    Association checkNumber(String number);

    List<Association> findFounderId(String founder);

    void myUpdate(Association association);

    int updateActivityNumberAndDay(Association association);

}
